home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / dev / obero / Interfaces3_4.lha / Interfaces / Console.mod < prev    next >
Text File  |  1994-03-05  |  3KB  |  127 lines

  1. (*
  2. (*
  3. **  Amiga Oberon Interface Module:
  4. **  $VER: Console.mod 40.15 (28.12.93) Oberon 3.0
  5. **
  6. **   © 1993 by Fridtjof Siebert
  7. **   updated for V39, V40 by hartmut Goebel
  8. *)
  9. *)
  10.  
  11. MODULE Console;
  12.  
  13. IMPORT e  * := Exec,
  14.        ie * := InputEvent,
  15.        km * := KeyMap,
  16.        u  * := Utility;
  17.  
  18. CONST
  19.  
  20.   consoleName * = "console.device";
  21.  
  22. (****** Console commands ******)
  23.   askKeyMap         * = e.nonstd+0;
  24.   setKeyMap         * = e.nonstd+1;
  25.   askDefaultKeyMap  * = e.nonstd+2;
  26.   setDefaultKeyMap  * = e.nonstd+3;
  27.  
  28. (****** SGR parameters ******)
  29.  
  30.   primary     * = 0;
  31.   bold        * = 1;
  32.   italic      * = 3;
  33.   underscore  * = 4;
  34.   negative    * = 7;
  35.  
  36.   normal        * = 22;      (* default foreground color, not bold *)
  37.   notItalic     * = 23;
  38.   notUnderscore * = 24;
  39.   positive      * = 27;
  40.  
  41. (* these names refer to the ANSI standard, not the implementation *)
  42.   blank       * = 30;
  43.   red         * = 31;
  44.   green       * = 32;
  45.   yellow      * = 33;
  46.   blue        * = 34;
  47.   magenta     * = 35;
  48.   cyan        * = 36;
  49.   white       * = 37;
  50.   default     * = 39;
  51.  
  52.   blackBg     * = 40;
  53.   redBg       * = 41;
  54.   greenBg     * = 42;
  55.   yellowBg    * = 43;
  56.   blueBg      * = 44;
  57.   magentaBg   * = 45;
  58.   cyanBg      * = 46;
  59.   whiteBg     * = 47;
  60.   defaultBg   * = 49;
  61.  
  62. (* these names refer to the implementation, they are the preferred *)
  63. (* names for use with the Amiga console device. *)
  64.   clr0        * = 30;
  65.   clr1        * = 31;
  66.   clr2        * = 32;
  67.   clr3        * = 33;
  68.   clr4        * = 34;
  69.   clr5        * = 35;
  70.   clr6        * = 36;
  71.   clr7        * = 37;
  72.  
  73.   clr0Bg      * = 40;
  74.   clr1Bg      * = 41;
  75.   clr2Bg      * = 42;
  76.   clr3Bg      * = 43;
  77.   clr4Bg      * = 44;
  78.   clr5Bg      * = 45;
  79.   clr6Bg      * = 46;
  80.   clr7Bg      * = 47;
  81.  
  82.  
  83. (****** DSR parameters ******)
  84.  
  85.   dsrCpr      * = 6;
  86.  
  87. (****** CTC parameters ******)
  88.   ctcHSetTab     * = 0;
  89.   ctcHClrTab     * = 2;
  90.   ctcHClrTabsAll * = 5;
  91.  
  92. (****** TBC parameters ******)
  93.   tbcHClrTab     * = 0;
  94.   tbcHClrTabsAll * = 3;
  95.  
  96. (****** SM and RM parameters ******)
  97.   mLNM   * = 20;      (* linefeed newline mode *)
  98.   mASM   * = ">1";    (* auto scroll mode *)
  99.   mAWM   * = "?7";    (* auto wrap mode *)
  100.  
  101.  
  102. VAR
  103. (*
  104.  *  You have to put a pointer to the console.device here to use the input
  105.  *  procedures:
  106.  *)
  107.  
  108.   base * : e.DevicePtr;
  109.  
  110.  
  111. PROCEDURE CDInputHandler*{base,- 42}(events{8}        : ie.InputEventDummyPtr;
  112.                                      consoleDevice{9} : e.LibraryPtr): ie.InputEventDummyPtr;
  113. PROCEDURE RawKeyConvert *{base,- 48}(events{8}        : e.APTR;
  114.                                      VAR buffer{9}    : ARRAY OF e.BYTE;
  115.                                      length{1}        : LONGINT;
  116.                                      keyMap{10}       : km.KeyMapPtr): LONGINT;
  117.  
  118. (*--- functions in V36 or higher (Release 2.0) ---*)
  119.  
  120. PROCEDURE GetConSnip    *{base,- 54}(): LONGINT;
  121. PROCEDURE SetConSnip    *{base,- 60}(snip{8}          : LONGINT);
  122. PROCEDURE AddConSnipHook*{base,- 66}(hook{8}          : u.HookPtr);
  123. PROCEDURE RemConSnipHook*{base,- 72}(hook{8}          : u.HookPtr);
  124.  
  125. END Console.
  126.  
  127.